
import Mixins from '@/views/mixins'
import employee from '@/api/system/employeeAPI'
import dempartment from '@/api/system/dempartmentAPI'
import position from '@/api/system/positionAPI'
export default {
  mixins: [Mixins],
  methods: {
    getRequestType (opt) {
      if (!opt && this.id === 'employee') {
        return employee.getEmployeeListAPI
      } else {
        if (opt === 'statisticsEmployeeCount') {
          return employee.statisticsEmployeeCountAPI
        } else if (opt === 'getDepartmentList') {
          return dempartment.getDepartmentListAPI
        } else if (opt === 'getDepartmentPosition') {
          return dempartment.getDepartmentPositionAPI
        } else if (opt === 'updatePosition') {
          return position.updatePositionAPI
        } else if (opt === 'deletePosition') {
          return position.deletePositionAPI
        } else if (opt === 'addPosition') {
          return position.addPositionAPI
        } else if (opt === 'deleteEmployeePositon') {
          return employee.deleteEmployeePositonAPI
        }
      }
    }
  }
}
